package com20230218;

public class Rose {
    public static void main(String[] args) {
        rose();
    }

    public static void rose(){
        for (int i = 1000; i < 10000; i++) {
            int q = i / 1000;
            int b = i / 100 % 10;
            int s = i / 10 % 10;
            int g = i % 10;
            if (Math.pow(q,4) + Math.pow(b,4) + Math.pow(s,4) + Math.pow(g,4) == i){
                System.out.println(i + "是玫瑰花数");
            }
        }

    }
}
